import { RefreshControl, StyleSheet } from 'react-native'

type CustomeFreshControl = {
  refreshing: boolean
  onRefresh?: () => void
}
export default function CustomeFreshControl(props: CustomeFreshControl) {
  return (
    <RefreshControl
      style={styles.refresh}
      refreshing={props.refreshing}
      onRefresh={props.onRefresh}
      tintColor="#fb969a"
    />
  )
}

const styles = StyleSheet.create({
  refresh: {
    position: 'absolute',
    zIndex: 2,
    height: 30,
    fontSize: 14,
    left: 0,
  },
})
